package com.xls.pet.controller;

import com.xls.pet.common.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/vue-admin-template/user")
public class UserController {

    @GetMapping("/info")
    public Result<?> info() {
        return Result.success(Map.of("avatar", "http://26.20.175.107:9000/pet/avatar.jpg",
                "introduction", "I am a super administrator", "name", "im Mei nv", "roles", List.of("admin")));
    }

    @PostMapping("/login")
    public Result<?> login() {
        return Result.success(Map.of("token", "admin-token"));
    }

    @PostMapping("/logout")
    public Result<?> logout() {
        return Result.success();
    }



}
